//
//  ViewController.m
//  IOS-1
//
//  Created by blue on 15-11-2.
//  Copyright (c) 2015年 clx. All rights reserved.
//

#import "ViewController.h"
#import "QuartzCore/QuartzCore.h"
@interface ViewController ()
{
    UILabel * l;

}

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor =[UIColor greenColor];
    //UILabel *l=[[UILabel alloc]initWithFrame:CGRectMake(100, 200, 100, 80)];
    
    l = [UILabel new];
    l.text =@"你好牛逼哦!";
    [l sizeToFit];
    l.center =  CGPointMake(self.view.frame.size.width/2.0,self.view.frame.size.height/2.0);
    l.textColor =[UIColor blueColor];
    [self.view addSubview:l];
    
    //UIView *view = [[UIView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];
    for (int i=0; i<5; i++)
    {
        UIView *v = [[UIView alloc]initWithFrame:CGRectMake(20+i*50+i*8, 100, 50, 50)];
        v.backgroundColor = [UIColor redColor];
        [self.view addSubview:l];
        
        
        v.layer.cornerRadius = 50/4;
        v.clipsToBounds = YES;
    
    UIView * linel = [[UIView alloc]initWithFrame:CGRectMake(20+i*50+i*8, 100, 50, 50)];
    linel.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:l];
    }
    
    for (int j=0; j<4; j++)
    {
        UIView * l=[[UIView alloc]initWithFrame:CGRectMake(50+j*100, 50, 3, 200)];
        l.backgroundColor = [UIColor redColor];
    for (int k=0; k<3; k++) {
        UIView * l1=[[UIView alloc]initWithFrame:CGRectMake(50, 49+k*100, 200, 3)];
        l1.backgroundColor = [UIColor redColor];
        [self.view addSubview:l1];
    }
    [self.view addSubview:l];
    
}
    
   - (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

